export default {
  /* eslint-disable */
  methods: {
    openWith(href) {
      const u = navigator.userAgent;
      if (navigator.userAgent.indexOf("jfjingbao") <= -1) {
        location.href = href;
      } else {
        // Android
        if (u.indexOf("Android") > -1 || u.indexOf("Adr") > -1) {
          window.Android.redirect("http://" + location.host + href);
          // ios
        } else {
          WebViewJavascriptBridge.openSafari("http://" + location.host + href);
        }
      }
    }
  }
};
